﻿<%@ Page Language="vb" Title="Edit Comments &lsaquo; Meo Tom's Blog" MasterPageFile="Admin.Master" AutoEventWireup="false" CodeBehind="ArticleComment.aspx.vb" Inherits="MeoTom.Web.Blog.ArticleComment" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ctph" Runat="Server">    
    <div style="float:left;width:100%;">
        <div id="iconComments" class="icon32"><br /></div>
        <h2>Edit Comments</h2>
    </div>
    <div class="form-wrap" style="float:left;width:98%;margin-right:20px;">
        <select name="selectedAction0">
            <option value="0">Action</option>
            <option value="1">-- Unapprove</option>
            <option value="3">-- Approve</option>
            <option value="2">-- Delete</option>
        </select>
        <asp:Button ID="btnApply" CssClass="button" runat="server" Width="60" Text="Apply" />&nbsp;&nbsp;
        <asp:GridView ID="grvComments" runat="server" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" 
            DataKeyNames="CommentsID" PageSize="10" EmptyDataText="No comments found" CssClass="tblMain" style="border-collapse:separate;" border="0">
            <Columns>
                <asp:TemplateField ItemStyle-Width="2%" ItemStyle-HorizontalAlign="Center" HeaderText="&lt;input type=&quot;checkbox&quot; name=&quot;cboCheck&quot; onfocus=&quot;this.blur();&quot; onclick=&quot;Util.CheckAll(document.aspnetForm.cboCheckLink);&quot; />">
                    <ItemTemplate>
                        <input type="checkbox" onfocus="this.blur();" name="cboCheckLink" value="<%#Eval("CommentsID")%>" />
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Author" ItemStyle-Width="15%">
                    <ItemTemplate>
                        <p class="pdAuthorComment">
                            <b><%#Eval("AddedBy")%></b></p>
                        <p class="pdAuthorComment">
                            <a href="mailto:<%#Eval("AddedByEmail")%>" title="<%#Eval("AddedByEmail")%>"><%#Eval("AddedByEmail")%></a></p>
                        <p class="pdAuthorComment">
                            <a href="ArticleComment.aspx?action=Search&s=<%#Eval("AddedByIP")%>" title="Search IP <%#Eval("AddedByIP")%>"><%#Eval("AddedByIP")%></a></p>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Comment" ItemStyle-Width="50%">
                    <ItemTemplate>
                        <div onmouseover="javascript:Util.DisplayPostAction('PostAction_<%#Eval("CommentsID")%>');" onmouseout="javascript:Util.HidePostAction('PostAction_<%#Eval("CommentsID")%>');">
                            Submitted on <a href="<%# Left(MeoTom.Core.Configs.HomeUrl,MeoTom.Core.Configs.HomeUrl.Length-1) %><%#Eval("ArticlePath") %>" target="_blank" title="<%#Eval("Title") %>"><%#String.Format("{0:dd/MM/yyyy}", DateTime.Parse(Eval("AddedDate")).AddHours(MeoTom.Core.Configs.TimeLine))%> at <%#String.Format("{0:HH:mm tt}", DateTime.Parse(Eval("AddedDate")).AddHours(MeoTom.Core.Configs.TimeLine))%></a><br />
                            <p class="pdCommentBody">
                                <%#Eval("Body")%></p>
                                <div class="PostAction" style="display:none;margin-top:11px;" id="PostAction_<%#Eval("CommentsID")%>"><%#WriteAction(Eval("Status").ToString(), Eval("CommentsID").ToString(), Eval("ArticlesId").ToString())%></div>
                        </div>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="In Response To">
                    <ItemTemplate>
                        <a href="ArticleUpdate.aspx?action=Edit&ID=<%#Eval("ArticlesId") %>" title="Edit Article: <%#Eval("Title") %>"><%#Eval("Title") %></a><br />
                        <p style="margin-top:5px;"><div class="post-com-count-wrapper">
                            <a class="post-com-count" href="ArticleComment.aspx?action=getByArticleID&ArticleID=<%# Eval("ArticlesID") %>"><span class="comment-count"><%#Eval("TotalComment")%></span></a>
                        </div>
                        <a href="<%# Left(MeoTom.Core.Configs.HomeUrl,MeoTom.Core.Configs.HomeUrl.Length-1) %><%#Eval("ArticlePath") %>" target="_blank" title="<%#Eval("Title") %>">#</a></p>
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
            <HeaderStyle CssClass="header" />
            <PagerSettings Mode="NumericFirstLast" />
            <PagerStyle CssClass="footer" Font-Size="14" />                
        </asp:GridView>
        <select name="selectedAction1">
            <option value="0">Action</option>
            <option value="1">-- Unapprove</option>
            <option value="3">-- Approve</option>
            <option value="2">-- Delete</option>
        </select>
        <asp:Button ID="btnApply2" CssClass="button" runat="server" Width="60" Text="Apply" />
    </div>    
    <script language="javascript" type="text/javascript">
        Menus.ChangeSelectedMenu('menu-5-2');
        Menus.DisplaySubMenu('menu-5-2');
    </script>    
</asp:Content>